﻿
CREATE PROCEDURE [dbo].[proc_ProjectInterfaceSet_Update]
	(
@ExCompanyId int,
		@departmentid int,
		@username nvarchar(50),
		@id int
	)
AS
	--设定项目接口人
	Update ProjectInterfaceSet Set ExCompanyId=@ExCompanyId,DepartmentId=@departmentid,UserName=@username where id=@id

	--更新项目表的
	Declare @CompanyId int,@ProductId int
	Select @CompanyId=CompanyId,@ProductId=ProductId From ProjectInterfaceSet Where Id=@Id
	Update Project Set ExecDepartmentId=@departmentid,ExecPerson=@username where productid=@ProductId and CompanyId=@CompanyId
	RETURN